#pragma once

#include <websocketpp/server.hpp>
#include<unordered_map>

class CampusLoginAdminister
{
public:
    static void setOnlineMap(std::unordered_map<std::string, websocketpp::connection_hdl>* online_map);
    static std::unordered_map<std::string, websocketpp::connection_hdl> GetOnlineMap();

private:
    CampusLoginAdminister();
    ~CampusLoginAdminister();

    CampusLoginAdminister(const CampusLoginAdminister&) = delete;
    CampusLoginAdminister& operator=(const CampusLoginAdminister&) = delete;

    static std::unordered_map<std::string, websocketpp::connection_hdl>* online_map_; // UID-连接句柄映射（管理在线状态）
};